home *** CD-ROM | disk | FTP | other *** search
/ Archive Magazine CD 1995 / Archive Magazine CD 1995.iso / discs / prog_disc / volume_2 / issue_04 / basiclist / blist
Unknown  |  1988-12-30  |  5.1 KB

open in: MacOS 8.1     |     Win98     |     DOS

view JSON data     |     view as text


This file was not able to be converted.
This format is not currently supported by dexvert.

ConfidenceProgramDetectionMatch TypeSupport
10% dexvert Truevision Targa Graphic (image/tga) magic Supported
100% file data default
100% xdgMime image/x-tga default (weak)



hex view
+--------+-------------------------+-------------------------+--------+--------+
|00000000| 0d 00 0a 0c f4 20 3e 42 | 4c 69 73 74 0d 00 14 0f |..... >B|List....|
|00000010| de 20 43 6f 64 65 20 26 | 31 30 30 0d 00 1e 12 4f |. Code &|100....O|
|00000020| 53 5f 57 72 69 74 65 49 | 3d 26 31 30 30 0d 00 28 |S_WriteI|=&100..(|
|00000030| 12 e3 20 46 25 3d 30 20 | b8 20 33 20 88 20 33 0d |.. F%=0 |. 3 . 3.|
|00000040| 00 32 0b 50 25 3d 43 6f | 64 65 0d 00 3c 0b 5b 4f |.2.P%=Co|de..<.[O|
|00000050| 50 54 20 46 25 0d 00 46 | 04 0d 00 50 46 5c 54 68 |PT F%..F|...PF\Th|
|00000060| 69 73 20 70 72 6f 67 72 | 61 6d 20 64 69 73 70 6c |is progr|am displ|
|00000070| 61 79 73 20 61 20 74 6f | 6b 65 6e 69 73 65 64 20 |ays a to|kenised |
|00000080| 42 61 73 69 63 20 70 72 | 6f 67 72 61 6d 2e 20 54 |Basic pr|ogram. T|
|00000090| 68 65 20 73 74 61 72 74 | 20 6f 66 20 74 68 65 0d |he start| of the.|
|000000a0| 00 5a 2c 5c 70 72 6f 67 | 72 61 6d 20 69 73 20 68 |.Z,\prog|ram is h|
|000000b0| 65 6c 64 20 69 6e 20 74 | 68 65 20 6c 6f 63 61 74 |eld in t|he locat|
|000000c0| 69 6f 6e 20 27 70 61 67 | 65 27 2e 0d 00 64 05 5c |ion 'pag|e'...d.\|
|000000d0| 0d 00 6e 2b 5c 52 37 20 | 69 73 20 75 73 65 64 20 |..n+\R7 |is used |
|000000e0| 61 73 20 61 20 70 6f 69 | 6e 74 65 72 20 74 6f 20 |as a poi|nter to |
|000000f0| 74 68 65 20 70 72 6f 67 | 72 61 6d 0d 00 78 05 5c |the prog|ram..x.\|
|00000100| 0d 00 82 43 5c 50 72 6f | 67 72 61 6d 20 6d 75 73 |...C\Pro|gram mus|
|00000110| 74 20 62 65 20 d6 65 64 | 20 66 72 6f 6d 20 42 61 |t be .ed| from Ba|
|00000120| 73 69 63 20 73 69 6e 63 | 65 20 69 74 20 75 73 65 |sic sinc|e it use|
|00000130| 73 20 74 68 65 20 42 61 | 73 69 63 20 72 6f 75 74 |s the Ba|sic rout|
|00000140| 69 6e 65 0d 00 8c 46 5c | 54 6f 6b 65 6e 41 64 64 |ine...F\|TokenAdd|
|00000150| 72 20 77 68 69 63 68 20 | 69 73 20 6f 6e 6c 79 20 |r which |is only |
|00000160| 61 63 63 65 73 73 69 62 | 6c 65 20 66 72 6f 6d 20 |accessib|le from |
|00000170| 74 68 65 20 76 61 6c 75 | 65 20 6f 66 20 52 31 34 |the valu|e of R14|
|00000180| 20 77 68 69 63 68 20 69 | 73 0d 00 96 20 5c 67 69 | which i|s... \gi|
|00000190| 76 65 6e 20 66 6f 72 20 | 61 20 72 65 74 75 72 6e |ven for |a return|
|000001a0| 20 74 6f 20 42 61 73 69 | 63 0d 00 a0 04 0d 00 aa | to Basi|c.......|
|000001b0| 24 5c 54 68 65 20 66 6f | 72 6d 61 74 20 6f 66 20 |$\The fo|rmat of |
|000001c0| 61 20 42 61 73 69 63 20 | 6c 69 6e 65 20 69 73 20 |a Basic |line is |
|000001d0| 3a 0d 00 b4 4c 5c 3c 30 | 44 3e 20 3c 48 69 67 68 |:...L\<0|D> <High|
|000001e0| 20 62 79 74 65 20 6f 66 | 20 6c 69 6e 65 20 6e 75 | byte of| line nu|
|000001f0| 6d 62 65 72 20 6f 72 20 | 26 46 46 20 61 74 20 65 |mber or |&FF at e|
|00000200| 6e 64 3e 20 3c 4c 6f 77 | 20 62 79 74 65 20 6f 66 |nd> <Low| byte of|
|00000210| 20 6c 69 6e 65 20 6e 75 | 6d 62 65 72 3e 0d 00 be | line nu|mber>...|
|00000220| 3d 5c 3c 6c 65 6e 67 74 | 68 20 6f 66 20 6c 69 6e |=\<lengt|h of lin|
|00000230| 65 2c 20 66 72 6f 6d 20 | 6f 6e 65 20 3c 30 44 3e |e, from |one <0D>|
|00000240| 20 74 6f 20 74 68 65 20 | 6e 65 78 74 3e 20 3c 6c | to the |next> <l|
|00000250| 69 6e 65 20 74 65 78 74 | 3e 2e 0d 00 c8 05 5c 0d |ine text|>.....\.|
|00000260| 00 d2 48 5c 43 68 61 72 | 61 63 74 65 72 73 20 6f |..H\Char|acters o|
|00000270| 66 20 26 37 46 20 61 6e | 64 20 6f 76 65 72 20 61 |f &7F an|d over a|
|00000280| 72 65 20 74 6f 6b 65 6e | 73 2c 20 61 6e 64 20 61 |re token|s, and a|
|00000290| 72 65 20 64 65 63 6f 64 | 65 64 20 62 79 20 6c 65 |re decod|ed by le|
|000002a0| 67 61 6c 20 75 73 65 0d | 00 dc 48 5c 6f 66 20 42 |gal use.|..H\of B|
|000002b0| 61 73 69 63 2e 20 54 6f | 6b 65 6e 20 26 38 44 20 |asic. To|ken &8D |
|000002c0| 70 72 65 63 65 64 65 73 | 20 61 20 6c 69 6e 65 20 |precedes| a line |
|000002d0| 6e 75 6d 62 65 72 20 77 | 68 69 63 68 20 69 73 20 |number w|hich is |
|000002e0| 64 65 63 6f 64 65 64 20 | 62 79 20 74 68 69 73 0d |decoded |by this.|
|000002f0| 00 e6 46 5c 70 72 6f 67 | 72 61 6d 20 62 65 63 61 |..F\prog|ram beca|
|00000300| 75 73 65 20 49 20 63 6f | 75 6c 64 6e 27 74 20 66 |use I co|uldn't f|
|00000310| 69 6e 64 20 61 20 77 61 | 79 20 74 6f 20 6d 61 6b |ind a wa|y to mak|
|00000320| 65 20 42 61 73 69 63 20 | 64 6f 20 69 74 20 65 61 |e Basic |do it ea|
|00000330| 73 69 6c 79 21 0d 00 f0 | 04 0d 00 fa 36 4c 44 52 |sily!...|....6LDR|
|00000340| 20 52 37 2c 50 61 67 65 | 20 5c 47 65 74 20 74 68 | R7,Page| \Get th|
|00000350| 65 20 70 72 6f 67 72 61 | 6d 20 73 74 61 72 74 20 |e progra|m start |
|00000360| 69 6e 74 6f 20 61 20 72 | 65 67 69 73 74 65 72 0d |into a r|egister.|
|00000370| 01 04 04 0d 01 0e 3a 5c | 43 68 65 63 6b 20 77 68 |......:\|Check wh|
|00000380| 65 74 68 65 72 20 69 74 | 20 70 6f 69 6e 74 73 20 |ether it| points |
|00000390| 61 74 20 61 20 26 30 44 | 20 2d 20 69 65 20 73 74 |at a &0D| - ie st|
|000003a0| 61 72 74 20 6f 66 20 61 | 20 6c 69 6e 65 0d 01 18 |art of a| line...|
|000003b0| 13 4c 44 52 42 20 52 30 | 2c 5b 52 37 5d 2c 23 31 |.LDRB R0|,[R7],#1|
|000003c0| 0d 01 22 0e 43 4d 50 20 | 52 30 2c 23 31 33 0d 01 |..".CMP |R0,#13..|
|000003d0| 2c 10 42 4e 45 20 42 61 | 64 53 74 61 72 74 0d 01 |,.BNE Ba|dStart..|
|000003e0| 36 04 0d 01 40 2f 5c 52 | 65 74 75 72 6e 20 70 6f |6...@/\R|eturn po|
|000003f0| 69 6e 74 20 66 6f 72 20 | 64 65 63 6f 64 69 6e 67 |int for |decoding|
|00000400| 20 73 75 63 63 65 73 73 | 69 76 65 20 6c 69 6e 65 | success|ive line|
|00000410| 73 0d 01 4a 0d 2e 6e 65 | 78 74 6c 69 6e 65 0d 01 |s..J..ne|xtline..|
|00000420| 54 14 53 57 49 20 22 4f | 53 5f 4e 65 77 4c 69 6e |T.SWI "O|S_NewLin|
|00000430| 65 22 0d 01 5e 04 0d 01 | 68 3a 5c 46 65 74 63 68 |e"..^...|h:\Fetch|
|00000440| 20 4d 53 42 20 6f 66 20 | 6c 69 6e 65 20 6e 75 6d | MSB of |line num|
|00000450| 62 65 72 20 61 6e 64 20 | 63 68 65 63 6b 20 66 6f |ber and |check fo|
|00000460| 72 20 65 6e 64 20 6f 66 | 20 70 72 6f 67 72 61 6d |r end of| program|
|00000470| 0d 01 72 13 4c 44 52 42 | 20 52 30 2c 5b 52 37 5d |..r.LDRB| R0,[R7]|
|00000480| 2c 23 31 0d 01 7c 0f 43 | 4d 50 20 52 30 2c 23 32 |,#1..|.C|MP R0,#2|
|00000490| 35 35 0d 01 86 2d ec 51 | 20 52 31 35 2c 52 31 34 |55...-.Q| R15,R14|
|000004a0| 20 5c 20 45 78 69 74 20 | 69 66 20 77 65 27 76 65 | \ Exit |if we've|
|000004b0| 20 67 6f 74 20 74 6f 20 | 74 68 65 20 65 6e 64 0d | got to |the end.|
|000004c0| 01 90 04 0d 01 9a 44 5c | 46 65 74 63 68 20 4c 53 |......D\|Fetch LS|
|000004d0| 42 20 6f 66 20 6c 69 6e | 65 20 6e 75 6d 62 65 72 |B of lin|e number|
|000004e0| 2c 20 61 6e 64 20 73 6b | 69 70 20 52 37 20 70 61 |, and sk|ip R7 pa|
|000004f0| 73 74 20 74 68 65 20 6c | 69 6e 65 20 6c 65 6e 67 |st the l|ine leng|
|00000500| 74 68 20 62 79 74 65 0d | 01 a4 13 4c 44 52 42 20 |th byte.|...LDRB |
|00000510| 52 31 2c 5b 52 37 5d 2c | 23 32 0d 01 ae 04 0d 01 |R1,[R7],|#2......|
|00000520| b8 2b 5c 41 6e 64 20 64 | 6f 20 61 20 6c 69 74 74 |.+\And d|o a litt|
|00000530| 6c 65 20 6a 75 67 67 6c | 69 6e 67 20 74 6f 20 64 |le juggl|ing to d|
|00000540| 69 73 70 6c 61 79 20 69 | 74 0d 01 c2 16 84 52 20 |isplay i|t.....R |
|00000550| 52 30 2c 52 31 2c 52 30 | 2c 4c 53 4c 20 23 38 0d |R0,R1,R0|,LSL #8.|
|00000560| 01 cc 11 41 44 52 20 52 | 31 2c 42 75 66 66 65 72 |...ADR R|1,Buffer|
|00000570| 0d 01 d6 0d 4d 4f 56 20 | 52 32 2c 23 38 0d 01 e0 |....MOV |R2,#8...|
|00000580| 1d 53 57 49 20 22 4f 53 | 5f 43 6f 6e 76 65 72 74 |.SWI "OS|_Convert|
|00000590| 43 61 72 64 69 6e 61 6c | 32 22 0d 01 ea 13 53 57 |Cardinal|2"....SW|
|000005a0| 49 20 22 4f 53 5f 57 72 | 69 74 65 30 22 0d 01 f4 |I "OS_Wr|ite0"...|
|000005b0| 15 53 57 49 20 4f 53 5f | 57 72 69 74 65 49 2b 26 |.SWI OS_|WriteI+&|
|000005c0| 32 30 0d 01 fe 04 0d 02 | 08 37 5c 52 65 2d 65 6e |20......|.7\Re-en|
|000005d0| 74 72 79 20 70 6f 69 6e | 74 20 66 6f 72 20 6e 65 |try poin|t for ne|
|000005e0| 78 74 20 63 68 61 72 61 | 63 74 65 72 20 69 6e 20 |xt chara|cter in |
|000005f0| 74 68 65 20 73 61 6d 65 | 20 6c 69 6e 65 0d 02 12 |the same| line...|
|00000600| 04 0d 02 1c 0d 2e 6e 65 | 78 74 63 68 61 72 0d 02 |......ne|xtchar..|
|00000610| 26 2d 4c 44 52 42 20 52 | 30 2c 5b 52 37 5d 2c 23 |&-LDRB R|0,[R7],#|
|00000620| 31 20 5c 46 65 74 63 68 | 20 74 68 65 20 6e 65 78 |1 \Fetch| the nex|
|00000630| 74 20 63 68 61 72 61 63 | 74 65 72 0d 02 30 0e 43 |t charac|ter..0.C|
|00000640| 4d 50 20 52 30 2c 23 31 | 33 0d 02 3a 38 42 45 51 |MP R0,#1|3..:8BEQ|
|00000650| 20 6e 65 78 74 6c 69 6e | 65 20 20 20 20 5c 47 6f | nextlin|e \Go|
|00000660| 20 69 66 20 69 74 20 69 | 73 20 74 68 65 20 73 74 | if it i|s the st|
|00000670| 61 72 74 20 6f 66 20 61 | 20 6e 65 77 20 6c 69 6e |art of a| new lin|
|00000680| 65 0d 02 44 0f 43 4d 50 | 20 52 30 2c 23 26 37 46 |e..D.CMP| R0,#&7F|
|00000690| 0d 02 4e 3e 42 43 53 20 | 74 6f 6b 65 6e 20 20 20 |..N>BCS |token |
|000006a0| 20 20 20 20 5c 47 6f 20 | 69 66 20 69 74 20 69 73 | \Go |if it is|
|000006b0| 20 61 20 74 6f 6b 65 6e | 20 72 61 74 68 65 72 20 | a token| rather |
|000006c0| 74 68 61 6e 20 70 6c 61 | 69 6e 20 97 49 49 0d 02 |than pla|in .II..|
|000006d0| 58 13 53 57 49 20 22 4f | 53 5f 57 72 69 74 65 43 |X.SWI "O|S_WriteC|
|000006e0| 22 0d 02 62 3f 42 20 6e | 65 78 74 63 68 61 72 20 |"..b?B n|extchar |
|000006f0| 20 20 20 20 20 5c 44 69 | 73 70 6c 61 79 20 97 49 | \Di|splay .I|
|00000700| 49 20 63 68 61 72 61 63 | 74 65 72 20 61 6e 64 20 |I charac|ter and |
|00000710| 67 6f 20 62 61 63 6b 20 | 66 6f 72 20 6d 6f 72 65 |go back |for more|
|00000720| 0d 02 6c 04 0d 02 76 28 | 5c 54 6f 6b 65 6e 20 64 |..l...v(|\Token d|
|00000730| 65 63 6f 64 65 20 72 6f | 75 74 69 6e 65 20 28 73 |ecode ro|utine (s|
|00000740| 65 65 20 50 52 4d 20 50 | 32 33 35 29 0d 02 80 04 |ee PRM P|235)....|
|00000750| 0d 02 8a 0a 2e 74 6f 6b | 65 6e 0d 02 94 0f 43 4d |.....tok|en....CM|
|00000760| 50 20 52 30 2c 23 26 38 | 44 0d 02 9e 3c 42 45 51 |P R0,#&8|D...<BEQ|
|00000770| 20 6c 69 6e 65 6e 75 6d | 62 65 72 20 20 5c 45 6e | linenum|ber \En|
|00000780| 63 6f 64 65 64 20 6c 69 | 6e 65 20 6e 75 6d 62 65 |coded li|ne numbe|
|00000790| 72 73 20 61 72 65 20 61 | 20 73 70 65 63 69 61 6c |rs are a| special|
|000007a0| 20 63 61 73 65 0d 02 a8 | 04 0d 02 b2 3d 53 54 4d | case...|....=STM|
|000007b0| 46 44 20 52 31 33 21 2c | 7b 52 31 34 7d 20 20 5c |FD R13!,|{R14} \|
|000007c0| 53 61 76 65 20 42 61 73 | 69 63 27 73 20 52 31 34 |Save Bas|ic's R14|
|000007d0| 20 62 65 66 6f 72 65 20 | 49 20 6d 65 73 73 20 77 | before |I mess w|
|000007e0| 69 74 68 20 69 74 0d 02 | bc 49 4d 4f 56 20 52 31 |ith it..|.IMOV R1|
|000007f0| 32 2c 52 37 20 20 20 20 | 20 20 20 5c 53 65 74 20 |2,R7 | \Set |
|00000800| 52 31 32 20 74 6f 20 70 | 6f 69 6e 74 20 61 74 20 |R12 to p|oint at |
|00000810| 6e 65 78 74 20 62 79 74 | 65 20 28 66 6f 72 20 74 |next byt|e (for t|
|00000820| 77 6f 20 62 79 74 65 20 | 74 6f 6b 65 6e 73 29 0d |wo byte |tokens).|
|00000830| 02 c6 39 41 44 44 20 52 | 31 2c 52 31 34 2c 23 37 |..9ADD R|1,R14,#7|
|00000840| 36 20 20 20 5c 54 6f 6b | 65 6e 41 64 64 72 20 69 |6 \Tok|enAddr i|
|00000850| 73 20 37 36 20 62 79 74 | 65 73 20 61 77 61 79 20 |s 76 byt|es away |
|00000860| 66 72 6f 6d 20 52 31 34 | 0d 02 d0 40 41 44 52 20 |from R14|...@ADR |
|00000870| 52 31 34 2c 6d 79 72 65 | 74 75 72 6e 20 5c 53 65 |R14,myre|turn \Se|
|00000880| 74 20 52 31 34 20 74 6f | 20 77 68 65 72 65 20 49 |t R14 to| where I|
|00000890| 20 77 61 6e 74 20 42 61 | 73 69 63 20 74 6f 20 72 | want Ba|sic to r|
|000008a0| 65 74 75 72 6e 20 74 6f | 0d 02 da 25 4d 4f 56 20 |eturn to|...%MOV |
|000008b0| 50 43 2c 52 31 20 20 20 | 20 20 20 20 20 5c 41 6e |PC,R1 | \An|
|000008c0| 64 20 65 6e 74 65 72 20 | 42 41 53 49 43 0d 02 e4 |d enter |BASIC...|
|000008d0| 04 0d 02 ee 38 20 5c 4e | 6f 74 65 20 2e 2e 2e 20 |....8 \N|ote ... |
|000008e0| 74 68 65 20 6d 65 74 68 | 6f 64 20 64 65 74 61 69 |the meth|od detai|
|000008f0| 6c 65 64 20 6f 6e 20 50 | 52 4d 20 50 32 33 31 20 |led on P|RM P231 |
|00000900| 69 73 20 77 72 6f 6e 67 | 2e 0d 02 f8 4a 20 5c 31 |is wrong|....J \1|
|00000910| 2e 20 54 68 65 20 6f 66 | 66 73 65 74 20 74 6f 20 |. The of|fset to |
|00000920| 53 74 6f 72 65 41 20 69 | 73 20 35 32 20 62 79 74 |StoreA i|s 52 byt|
|00000930| 65 73 2c 20 6e 6f 74 20 | 34 32 20 28 65 76 65 72 |es, not |42 (ever|
|00000940| 79 20 65 6e 74 72 79 20 | 69 73 20 34 20 62 79 74 |y entry |is 4 byt|
|00000950| 65 73 29 0d 03 02 4a 20 | 5c 32 2e 20 54 68 65 20 |es)...J |\2. The |
|00000960| 74 65 63 68 6e 69 71 75 | 65 20 73 68 6f 77 6e 20 |techniqu|e shown |
|00000970| 61 73 73 75 6d 65 73 20 | 61 6e 20 41 64 64 72 65 |assumes |an Addre|
|00000980| 73 73 20 69 73 20 73 74 | 6f 72 65 64 2c 20 72 61 |ss is st|ored, ra|
|00000990| 74 68 65 72 20 74 68 61 | 6e 20 74 68 65 0d 03 0c |ther tha|n the...|
|000009a0| 35 20 5c 20 20 20 42 72 | 61 6e 63 68 20 69 6e 73 |5 \ Br|anch ins|
|000009b0| 74 72 75 63 74 69 6f 6e | 20 77 68 69 63 68 20 69 |truction| which i|
|000009c0| 73 20 61 63 74 75 61 6c | 6c 79 20 74 68 65 72 65 |s actual|ly there|
|000009d0| 20 21 0d 03 16 04 0d 03 | 20 0d 2e 6d 79 72 65 74 | !......| ..myret|
|000009e0| 75 72 6e 0d 03 2a 49 4d | 4f 56 20 52 37 2c 52 31 |urn..*IM|OV R7,R1|
|000009f0| 32 20 20 20 20 20 20 20 | 20 5c 52 31 32 20 77 69 |2 | \R12 wi|
|00000a00| 6c 6c 20 62 65 20 6e 65 | 78 74 20 62 79 74 65 20 |ll be ne|xt byte |
|00000a10| 74 6f 20 64 65 63 6f 64 | 65 20 28 69 74 20 77 69 |to decod|e (it wi|
|00000a20| 6c 6c 20 68 61 76 65 20 | 62 65 65 6e 0d 03 34 49 |ll have |been..4I|
|00000a30| 20 20 20 20 20 20 20 20 | 20 20 20 20 20 20 20 20 | | |
|00000a40| 20 20 5c 69 6e 63 72 65 | 6d 65 6e 74 65 64 20 62 | \incre|mented b|
|00000a50| 79 20 42 61 73 69 63 20 | 69 66 20 61 20 74 77 6f |y Basic |if a two|
|00000a60| 20 62 79 74 65 20 74 6f | 6b 65 6e 20 77 61 73 20 | byte to|ken was |
|00000a70| 64 6f 6e 65 29 0d 03 3e | 2a 4c 44 4d 46 44 20 52 |done)..>|*LDMFD R|
|00000a80| 31 33 21 2c 7b 52 31 34 | 7d 20 20 5c 52 65 63 6f |13!,{R14|} \Reco|
|00000a90| 76 65 72 20 42 61 73 69 | 63 27 73 20 52 31 34 0d |ver Basi|c's R14.|
|00000aa0| 03 48 04 0d 03 52 45 5c | 54 68 65 20 72 6f 75 74 |.H...RE\|The rout|
|00000ab0| 69 6e 65 20 72 65 74 75 | 72 6e 73 20 77 69 74 68 |ine retu|rns with|
|00000ac0| 20 52 31 20 70 6f 69 6e | 74 69 6e 67 20 61 74 20 | R1 poin|ting at |
|00000ad0| 61 20 73 74 72 69 6e 67 | 20 74 65 72 6d 69 6e 61 |a string| termina|
|00000ae0| 74 65 64 20 62 79 20 61 | 0d 03 5c 14 5c 63 68 61 |ted by a|..\.\cha|
|00000af0| 72 61 63 74 65 72 20 3e | 3d 26 37 46 0d 03 66 04 |racter >|=&7F..f.|
|00000b00| 0d 03 70 0f 2e 6e 65 78 | 74 74 6f 6b 63 68 72 0d |..p..nex|ttokchr.|
|00000b10| 03 7a 26 4c 44 52 42 20 | 52 30 2c 5b 52 31 5d 2c |.z&LDRB |R0,[R1],|
|00000b20| 23 31 20 5c 46 65 74 63 | 68 20 61 20 63 68 61 72 |#1 \Fetc|h a char|
|00000b30| 61 63 74 65 72 0d 03 84 | 0f 43 4d 50 20 52 30 2c |acter...|.CMP R0,|
|00000b40| 23 26 37 46 0d 03 8e 33 | 42 43 53 20 6e 65 78 74 |#&7F...3|BCS next|
|00000b50| 63 68 61 72 20 20 20 20 | 5c 46 69 6e 69 73 68 20 |char |\Finish |
|00000b60| 77 68 65 6e 20 74 65 72 | 6d 69 6e 61 74 6f 72 20 |when ter|minator |
|00000b70| 69 73 20 73 65 65 6e 0d | 03 98 13 53 57 49 20 22 |is seen.|...SWI "|
|00000b80| 4f 53 5f 57 72 69 74 65 | 43 22 0d 03 a2 37 42 20 |OS_Write|C"...7B |
|00000b90| 6e 65 78 74 74 6f 6b 63 | 68 72 20 20 20 20 5c 44 |nexttokc|hr \D|
|00000ba0| 69 73 70 6c 61 79 20 69 | 74 20 61 6e 64 20 67 6f |isplay i|t and go|
|00000bb0| 20 62 61 63 6b 20 66 6f | 72 20 61 6e 6f 74 68 65 | back fo|r anothe|
|00000bc0| 72 0d 03 ac 04 0d 03 b6 | 0f 2e 6c 69 6e 65 6e 75 |r.......|..linenu|
|00000bd0| 6d 62 65 72 0d 03 c0 04 | 0d 03 ca 44 5c 54 68 69 |mber....|...D\Thi|
|00000be0| 73 20 72 6f 75 74 69 6e | 65 20 64 65 63 6f 64 65 |s routin|e decode|
|00000bf0| 73 20 74 68 65 20 74 68 | 72 65 65 20 62 79 74 65 |s the th|ree byte|
|00000c00| 20 69 6e 74 65 72 6e 61 | 6c 20 66 6f 72 6d 20 75 | interna|l form u|
|00000c10| 73 65 64 20 66 6f 72 20 | 6c 69 6e 65 0d 03 d4 0d |sed for |line....|
|00000c20| 5c 6e 75 6d 62 65 72 73 | 2e 0d 03 de 04 0d 03 e8 |\numbers|........|
|00000c30| 48 5c 47 69 76 65 6e 20 | 74 68 61 74 20 74 68 65 |H\Given |that the|
|00000c40| 20 6c 69 6e 65 20 6e 75 | 6d 62 65 72 20 69 73 20 | line nu|mber is |
|00000c50| 31 36 20 62 69 74 73 2c | 20 62 31 35 2d 62 30 20 |16 bits,| b15-b0 |
|00000c60| 74 68 65 20 65 6e 63 6f | 64 69 6e 67 20 75 73 65 |the enco|ding use|
|00000c70| 64 20 69 73 3a 0d 03 f2 | 04 0d 03 fc 48 5c 20 20 |d is:...|....H\ |
|00000c80| 20 20 20 20 20 20 20 20 | 20 20 20 42 69 74 20 37 | | Bit 7|
|00000c90| 20 20 42 69 74 20 36 20 | 20 42 69 74 20 35 20 20 | Bit 6 | Bit 5 |
|00000ca0| 42 69 74 20 34 20 20 42 | 69 74 20 33 20 20 42 69 |Bit 4 B|it 3 Bi|
|00000cb0| 74 20 32 20 20 42 69 74 | 20 31 20 20 42 69 74 20 |t 2 Bit| 1 Bit |
|00000cc0| 30 0d 04 06 46 5c 20 46 | 69 72 73 74 20 42 79 74 |0...F\ F|irst Byt|
|00000cd0| 65 20 20 20 20 30 20 20 | 20 20 20 20 31 20 20 20 |e 0 | 1 |
|00000ce0| 20 20 62 37 20 20 20 20 | 20 62 36 2a 20 20 20 20 | b7 | b6* |
|00000cf0| 62 31 35 20 20 20 20 62 | 31 34 2a 20 20 20 20 30 |b15 b|14* 0|
|00000d00| 20 20 20 20 20 20 30 0d | 04 10 46 5c 20 53 65 63 | 0.|..F\ Sec|
|00000d10| 6f 6e 64 20 42 79 74 65 | 20 20 20 30 20 20 20 20 |ond Byte| 0 |
|00000d20| 20 20 31 20 20 20 20 20 | 62 35 20 20 20 20 20 62 | 1 |b5 b|
|00000d30| 34 20 20 20 20 20 62 33 | 20 20 20 20 20 62 32 20 |4 b3| b2 |
|00000d40| 20 20 20 20 62 31 20 20 | 20 20 20 62 30 0d 04 1a | b1 | b0...|
|00000d50| 46 5c 20 54 68 69 72 64 | 20 42 79 74 65 20 20 20 |F\ Third| Byte |
|00000d60| 20 30 20 20 20 20 20 20 | 31 20 20 20 20 20 62 31 | 0 |1 b1|
|00000d70| 33 20 20 20 20 62 31 32 | 20 20 20 20 62 31 31 20 |3 b12| b11 |
|00000d80| 20 20 20 62 31 30 20 20 | 20 20 62 39 20 20 20 20 | b10 | b9 |
|00000d90| 20 62 38 0d 04 24 04 0d | 04 2e 40 5c 20 54 68 65 | b8..$..|..@\ The|
|00000da0| 20 74 77 6f 20 6d 61 72 | 6b 65 64 20 2a 20 61 72 | two mar|ked * ar|
|00000db0| 65 20 69 6e 76 65 72 74 | 65 64 2c 20 27 30 27 20 |e invert|ed, '0' |
|00000dc0| 61 6e 64 20 27 31 27 20 | 61 72 65 20 66 69 78 65 |and '1' |are fixe|
|00000dd0| 64 20 62 69 74 73 2e 0d | 04 38 04 0d 04 42 46 5c |d bits..|.8...BF\|
|00000de0| 20 54 68 65 20 61 63 74 | 75 61 6c 20 63 6f 64 65 | The act|ual code|
|00000df0| 20 68 65 72 65 20 69 73 | 20 6c 65 66 74 20 74 6f | here is| left to|
|00000e00| 20 74 68 65 20 6d 6f 73 | 74 20 65 6e 74 68 75 73 | the mos|t enthus|
|00000e10| 69 61 73 74 69 63 20 6f | 66 20 72 65 61 64 65 72 |iastic o|f reader|
|00000e20| 73 0d 04 4c 11 5c 20 74 | 6f 20 66 61 74 68 6f 6d |s..L.\ t|o fathom|
|00000e30| 20 21 0d 04 56 04 0d 04 | 60 13 4c 44 52 42 20 52 | !..V...|`.LDRB R|
|00000e40| 31 2c 5b 52 37 5d 2c 23 | 31 0d 04 6a 13 4c 44 52 |1,[R7],#|1..j.LDR|
|00000e50| 42 20 52 32 2c 5b 52 37 | 5d 2c 23 31 0d 04 74 13 |B R2,[R7|],#1..t.|
|00000e60| 4c 44 52 42 20 52 33 2c | 5b 52 37 5d 2c 23 31 0d |LDRB R3,|[R7],#1.|
|00000e70| 04 7e 12 42 49 43 20 52 | 31 2c 52 31 2c 23 26 43 |.~.BIC R|1,R1,#&C|
|00000e80| 30 0d 04 88 12 42 49 43 | 20 52 32 2c 52 32 2c 23 |0....BIC| R2,R2,#|
|00000e90| 26 43 30 0d 04 92 12 42 | 49 43 20 52 33 2c 52 33 |&C0....B|IC R3,R3|
|00000ea0| 2c 23 26 43 30 0d 04 9c | 10 82 20 52 31 2c 52 31 |,#&C0...|.. R1,R1|
|00000eb0| 2c 23 26 31 34 0d 04 a6 | 15 4d 4f 56 20 52 30 2c |,#&14...|.MOV R0,|
|00000ec0| 52 31 2c 4c 53 4c 20 23 | 31 32 0d 04 b0 14 42 49 |R1,LSL #|12....BI|
|00000ed0| 43 20 52 30 2c 52 30 2c | 23 26 33 30 30 30 0d 04 |C R0,R0,|#&3000..|
|00000ee0| ba 12 42 49 43 20 52 31 | 2c 52 31 2c 23 26 30 43 |..BIC R1|,R1,#&0C|
|00000ef0| 0d 04 c4 16 84 52 20 52 | 30 2c 52 30 2c 52 33 2c |.....R R|0,R0,R3,|
|00000f00| 4c 53 4c 20 23 38 0d 04 | ce 16 84 52 20 52 30 2c |LSL #8..|...R R0,|
|00000f10| 52 30 2c 52 31 2c 4c 53 | 4c 20 23 32 0d 04 d8 0f |R0,R1,LS|L #2....|
|00000f20| 84 52 20 52 30 2c 52 30 | 2c 52 32 0d 04 e2 04 0d |.R R0,R0|,R2.....|
|00000f30| 04 ec 3a 5c 20 52 30 20 | 69 73 20 6e 6f 77 20 61 |..:\ R0 |is now a|
|00000f40| 20 63 6f 6e 76 65 6e 74 | 69 6f 6e 61 6c 20 31 36 | convent|ional 16|
|00000f50| 20 62 69 74 20 76 61 6c | 75 65 2c 20 73 6f 20 64 | bit val|ue, so d|
|00000f60| 69 73 70 6c 61 79 20 69 | 74 0d 04 f6 04 0d 05 00 |isplay i|t.......|
|00000f70| 11 41 44 52 20 52 31 2c | 42 75 66 66 65 72 0d 05 |.ADR R1,|Buffer..|
|00000f80| 0a 0d 4d 4f 56 20 52 32 | 2c 23 38 0d 05 14 1d 53 |..MOV R2|,#8....S|
|00000f90| 57 49 20 22 4f 53 5f 43 | 6f 6e 76 65 72 74 43 61 |WI "OS_C|onvertCa|
|00000fa0| 72 64 69 6e 61 6c 32 22 | 0d 05 1e 13 53 57 49 20 |rdinal2"|....SWI |
|00000fb0| 22 4f 53 5f 57 72 69 74 | 65 30 22 0d 05 28 32 42 |"OS_Writ|e0"..(2B|
|00000fc0| 20 6e 65 78 74 63 68 61 | 72 20 20 20 20 20 5c 20 | nextcha|r \ |
|00000fd0| 41 6e 64 20 67 6f 20 62 | 61 63 6b 20 66 6f 72 20 |And go b|ack for |
|00000fe0| 74 68 65 20 6e 65 78 74 | 20 62 79 74 65 0d 05 32 |the next| byte..2|
|00000ff0| 04 0d 05 3c 3d 5c 44 69 | 73 70 6c 61 79 20 65 72 |...<=\Di|splay er|
|00001000| 72 6f 72 20 6d 65 73 73 | 61 67 65 20 66 6f 72 20 |ror mess|age for |
|00001010| 62 61 64 20 73 74 61 72 | 74 69 6e 67 20 6c 6f 63 |bad star|ting loc|
|00001020| 61 74 69 6f 6e 20 61 6e | 64 20 65 78 69 74 0d 05 |ation an|d exit..|
|00001030| 46 04 0d 05 50 0d 2e 42 | 61 64 53 74 61 72 74 0d |F...P..B|adStart.|
|00001040| 05 5a 13 53 57 49 20 22 | 4f 53 5f 57 72 69 74 65 |.Z.SWI "|OS_Write|
|00001050| 53 22 0d 05 64 1f 45 51 | 55 53 20 22 42 61 64 20 |S"..d.EQ|US "Bad |
|00001060| 53 74 61 72 74 22 2b bd | 31 33 2b bd 31 30 2b bd |Start"+.|13+.10+.|
|00001070| 30 0d 05 6e 09 41 4c 49 | 47 4e 0d 05 78 0f 4d 4f |0..n.ALI|GN..x.MO|
|00001080| 56 20 52 31 35 2c 52 31 | 34 0d 05 82 04 0d 05 8c |V R15,R1|4.......|
|00001090| 3d 2e 42 75 66 66 65 72 | 20 44 43 44 20 30 20 20 |=.Buffer| DCD 0 |
|000010a0| 5c 20 38 20 62 79 74 65 | 20 62 75 66 66 65 72 20 |\ 8 byte| buffer |
|000010b0| 75 73 65 64 20 66 6f 72 | 20 53 57 49 20 4f 53 5f |used for| SWI OS_|
|000010c0| 43 6f 6e 76 65 72 74 2e | 2e 2e 0d 05 96 09 44 43 |Convert.|......DC|
|000010d0| 44 20 30 0d 05 a0 04 0d | 05 aa 37 2e 50 61 67 65 |D 0.....|..7.Page|
|000010e0| 20 45 51 55 44 20 26 38 | 46 30 30 20 5c 20 4c 6f | EQUD &8|F00 \ Lo|
|000010f0| 63 61 74 69 6f 6e 20 6f | 66 20 66 69 72 73 74 20 |cation o|f first |
|00001100| 6c 69 6e 65 20 74 6f 20 | 64 65 63 6f 64 65 0d 05 |line to |decode..|
|00001110| b4 06 20 5d 0d 05 be 06 | 20 ed 0d 05 bf 06 20 3a |.. ]....| ..... :|
|00001120| 0d 05 c0 07 eb 31 32 0d | 05 c1 22 f1 22 42 41 53 |.....12.|.."."BAS|
|00001130| 49 43 20 4c 69 73 74 65 | 72 20 62 79 20 41 6c 61 |IC Liste|r by Ala|
|00001140| 6e 20 47 6c 6f 76 65 72 | 22 0d 05 c2 05 f1 0d 05 |n Glover|".......|
|00001150| c8 48 f1 22 54 68 69 73 | 20 70 72 6f 67 72 61 6d |.H."This| program|
|00001160| 20 64 69 73 70 6c 61 79 | 73 20 61 20 74 6f 6b 65 | display|s a toke|
|00001170| 6e 69 73 65 64 20 42 61 | 73 69 63 20 70 72 6f 67 |nised Ba|sic prog|
|00001180| 72 61 6d 2e 20 54 68 65 | 20 73 74 61 72 74 20 6f |ram. The| start o|
|00001190| 66 20 74 68 65 22 0d 05 | d2 2e f1 22 70 72 6f 67 |f the"..|..."prog|
|000011a0| 72 61 6d 20 69 73 20 68 | 65 6c 64 20 69 6e 20 74 |ram is h|eld in t|
|000011b0| 68 65 20 6c 6f 63 61 74 | 69 6f 6e 20 27 70 61 67 |he locat|ion 'pag|
|000011c0| 65 27 2e 22 0d 05 dc 05 | f1 0d 05 e6 2d f1 22 52 |e'."....|....-."R|
|000011d0| 37 20 69 73 20 75 73 65 | 64 20 61 73 20 61 20 70 |7 is use|d as a p|
|000011e0| 6f 69 6e 74 65 72 20 74 | 6f 20 74 68 65 20 70 72 |ointer t|o the pr|
|000011f0| 6f 67 72 61 6d 22 0d 05 | f0 05 f1 0d 05 fa 48 f1 |ogram"..|......H.|
|00001200| 22 50 72 6f 67 72 61 6d | 20 6d 75 73 74 20 62 65 |"Program| must be|
|00001210| 20 43 41 4c 4c 65 64 20 | 66 72 6f 6d 20 42 61 73 | CALLed |from Bas|
|00001220| 69 63 20 73 69 6e 63 65 | 20 69 74 20 75 73 65 73 |ic since| it uses|
|00001230| 20 74 68 65 20 42 61 73 | 69 63 20 72 6f 75 74 69 | the Bas|ic routi|
|00001240| 6e 65 22 0d 06 04 48 f1 | 22 54 6f 6b 65 6e 41 64 |ne"...H.|"TokenAd|
|00001250| 64 72 20 77 68 69 63 68 | 20 69 73 20 6f 6e 6c 79 |dr which| is only|
|00001260| 20 61 63 63 65 73 73 69 | 62 6c 65 20 66 72 6f 6d | accessi|ble from|
|00001270| 20 74 68 65 20 76 61 6c | 75 65 20 6f 66 20 52 31 | the val|ue of R1|
|00001280| 34 20 77 68 69 63 68 20 | 69 73 22 0d 06 0e 22 f1 |4 which |is"...".|
|00001290| 22 67 69 76 65 6e 20 66 | 6f 72 20 61 20 72 65 74 |"given f|or a ret|
|000012a0| 75 72 6e 20 74 6f 20 42 | 61 73 69 63 22 0d 06 18 |urn to B|asic"...|
|000012b0| 04 0d 06 22 26 f1 22 54 | 68 65 20 66 6f 72 6d 61 |..."&."T|he forma|
|000012c0| 74 20 6f 66 20 61 20 42 | 61 73 69 63 20 6c 69 6e |t of a B|asic lin|
|000012d0| 65 20 69 73 20 3a 22 0d | 06 2c 4e f1 22 3c 30 44 |e is :".|.,N."<0D|
|000012e0| 3e 20 3c 48 69 67 68 20 | 62 79 74 65 20 6f 66 20 |> <High |byte of |
|000012f0| 6c 69 6e 65 20 6e 75 6d | 62 65 72 20 6f 72 20 26 |line num|ber or &|
|00001300| 46 46 20 61 74 20 65 6e | 64 3e 20 3c 4c 6f 77 20 |FF at en|d> <Low |
|00001310| 62 79 74 65 20 6f 66 20 | 6c 69 6e 65 20 6e 75 6d |byte of |line num|
|00001320| 62 65 72 3e 22 0d 06 36 | 3f f1 22 3c 6c 65 6e 67 |ber>"..6|?."<leng|
|00001330| 74 68 20 6f 66 20 6c 69 | 6e 65 2c 20 66 72 6f 6d |th of li|ne, from|
|00001340| 20 6f 6e 65 20 3c 30 44 | 3e 20 74 6f 20 74 68 65 | one <0D|> to the|
|00001350| 20 6e 65 78 74 3e 20 3c | 6c 69 6e 65 20 74 65 78 | next> <|line tex|
|00001360| 74 3e 2e 22 0d 06 40 05 | f1 0d 06 4a 4a f1 22 43 |t>."..@.|...JJ."C|
|00001370| 68 61 72 61 63 74 65 72 | 73 20 6f 66 20 26 37 46 |haracter|s of &7F|
|00001380| 20 61 6e 64 20 6f 76 65 | 72 20 61 72 65 20 74 6f | and ove|r are to|
|00001390| 6b 65 6e 73 2c 20 61 6e | 64 20 61 72 65 20 64 65 |kens, an|d are de|
|000013a0| 63 6f 64 65 64 20 62 79 | 20 6c 65 67 61 6c 20 75 |coded by| legal u|
|000013b0| 73 65 22 0d 06 54 4a f1 | 22 6f 66 20 42 61 73 69 |se"..TJ.|"of Basi|
|000013c0| 63 2e 20 54 6f 6b 65 6e | 20 26 38 44 20 70 72 65 |c. Token| &8D pre|
|000013d0| 63 65 64 65 73 20 61 20 | 6c 69 6e 65 20 6e 75 6d |cedes a |line num|
|000013e0| 62 65 72 20 77 68 69 63 | 68 20 69 73 20 64 65 63 |ber whic|h is dec|
|000013f0| 6f 64 65 64 20 62 79 20 | 74 68 69 73 22 0d 06 5e |oded by |this"..^|
|00001400| 48 f1 22 70 72 6f 67 72 | 61 6d 20 62 65 63 61 75 |H."progr|am becau|
|00001410| 73 65 20 49 20 63 6f 75 | 6c 64 6e 27 74 20 66 69 |se I cou|ldn't fi|
|00001420| 6e 64 20 61 20 77 61 79 | 20 74 6f 20 6d 61 6b 65 |nd a way| to make|
|00001430| 20 42 61 73 69 63 20 64 | 6f 20 69 74 20 65 61 73 | Basic d|o it eas|
|00001440| 69 6c 79 21 22 0d 06 68 | 05 f1 0d 06 72 24 f1 22 |ily!"..h|....r$."|
|00001450| 55 73 65 20 22 22 43 41 | 4c 4c 20 43 6f 64 65 22 |Use ""CA|LL Code"|
|00001460| 22 20 74 6f 20 65 78 65 | 63 75 74 65 22 27 0d ff |" to exe|cute"'..|
+--------+-------------------------+-------------------------+--------+--------+